﻿package com.msjt.dao;

import com.msjt.base.BaseDAO;
import com.msjt.entity.Company;
/**
 * name:CompanyDAO
 * function:公司信息dao
 * author: kw
 * time:2013.8.26
 */
public class CompanyDAO extends BaseDAO {
	//查看公司信息
	public Company getCompanyInfo(){
		return (Company)this.findById(1);
	}
	//修改公司信息
	public boolean updateCompany(Company com){
		String hql="update Company as c set c.companyName=?,c.companyAddr=?" +
				",c.companyPhone=?,c.companyCz=?,c.companyWz=?,c.companyCard=?,c.companyDesc=? where c.companyId=?";
		Object [] params={com.getCompanyName(),com.getCompanyAddr(),com.getCompanyPhone(),com.getCompanyCz(),com.getCompanyWz(),com.getCompanyCard()
				,com.getCompanyDesc(),com.getCompanyId()};
		return this.updateByHql(hql, params);
		//return this.updateCompany(com);
	}
}
